package com.xiweicheng.test.jpa.entity;
// Generated 2018-7-13 22:08:49 by Hibernate Tools 5.0.6.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * TranslateItemHistory generated by hbm2java
 */
@Entity
@Table(name = "translate_item_history", catalog = "tms")
public class TranslateItemHistory implements java.io.Serializable {

	private Long id;
	private long version;
	private TranslateItem translateItem;
	private Date createDate;
	private String creator;
	private String itemContent;
	private Date itemCreateDate;
	private String itemCreator;
	private String status;

	public TranslateItemHistory() {
	}

	public TranslateItemHistory(String status) {
		this.status = status;
	}

	public TranslateItemHistory(TranslateItem translateItem, Date createDate, String creator, String itemContent,
			Date itemCreateDate, String itemCreator, String status) {
		this.translateItem = translateItem;
		this.createDate = createDate;
		this.creator = creator;
		this.itemContent = itemContent;
		this.itemCreateDate = itemCreateDate;
		this.itemCreator = itemCreator;
		this.status = status;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public long getVersion() {
		return this.version;
	}

	public void setVersion(long version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "translate_item_id")
	public TranslateItem getTranslateItem() {
		return this.translateItem;
	}

	public void setTranslateItem(TranslateItem translateItem) {
		this.translateItem = translateItem;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "creator")
	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Column(name = "item_content")
	public String getItemContent() {
		return this.itemContent;
	}

	public void setItemContent(String itemContent) {
		this.itemContent = itemContent;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "item_create_date", length = 19)
	public Date getItemCreateDate() {
		return this.itemCreateDate;
	}

	public void setItemCreateDate(Date itemCreateDate) {
		this.itemCreateDate = itemCreateDate;
	}

	@Column(name = "item_creator")
	public String getItemCreator() {
		return this.itemCreator;
	}

	public void setItemCreator(String itemCreator) {
		this.itemCreator = itemCreator;
	}

	@Column(name = "status", nullable = false)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
